<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;

setcookie("user_id",0);
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>项目上传</title>
    <!--<meta name="description" content="这是主页">-->
    <meta name="keywords" content="form">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="css/chinaz.css">
    <link rel="stylesheet" href="css/amazeui.swiper.min.css">


    <link rel="stylesheet" href="css/index.css">
    <!--<link rel="stylesheet" href="css/amazeui.slick.min.css">
-->
    <!--<link rel="icon" type="image/png" href="assets/i/favicon.png">
-->
    <!--<link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
-->
    <!--<meta name="apple-mobile-web-app-title" content="Amaze UI" />
-->
<link rel="stylesheet" href="assets/css/amazeui.min.css"/>
<link rel="stylesheet" href="assets/css/layout.css"/>
<!--<link rel="stylesheet" href="assets/css/admin.css">--></head>
<body>
    <style>


        .objDetail {
            width: 23%;
            border-bottom: 1px solid #7c7c7c;
            margin-left: 2%;
            float: left;
            margin-bottom: 20px;
        }

        .am-pagination li a {
            border-radius: 4px;
            background-color: #dfe5e9;
            color: #7f8c8d;
        }
    </style>
<!--    <div style="background-color: #FFFFFF;height: 60px">-->
<!--        <img src="img/logo-06.png" id="layoutLogo" style="float: left;margin-left: 5%;margin-right: 30px">-->
<!---->
<!--        <div id='cssmenu' style="float: left">-->
<!--            <ul>-->
<!---->
<!--            <li class="">-->
<!--                <a href=-->
<!--                --><?//= Url::toRoute('index/show'); ?>
<!--                >首页</a>-->
<!--            </li>-->
<!---->
<!--            <li>-->
<!--                <a href=-->
<!--                --><?//= Url::toRoute('project/show'); ?>
<!--                >创业项目</a>-->
<!--            </li>-->
<!--            <li class=' has-sub'>-->
<!--                <a href=-->
<!--                --><?//= Url::toRoute('raised/show'); ?>
<!--                >项目聚幕</a>-->
<!--                <ul>-->
<!--                    <li class='has-sub sub-li'>-->
<!--                        <a href=-->
<!--                        --><?//= Url::toRoute('raised/show'); ?>
<!--                        >投资聚募</a>-->
<!--                    </li>-->
<!--                    <li class='has-sub sub-li'>-->
<!--                        <a href=-->
<!--                        --><?//= Url::toRoute('raised/select'); ?>
<!--                        >我要融资</a>-->
<!---->
<!--                    </li>-->
<!--                </ul>-->
<!--            </li>-->
<!--            <li class=' has-sub'>-->
<!--                <a href=-->
<!--                --><?//= Url::toRoute('basic-service/show-activity'); ?>
<!--                >基础服务</a>-->
<!--                <ul>-->
<!--                    <li class='has-sub sub-li'>-->
<!--                        <a href=-->
<!--                        --><?//= Url::toRoute('basic-service/show-activity'); ?>
<!--                        >线下活动</a>-->
<!--                    </li>-->
<!--                    <li class='has-sub sub-li'>-->
<!--                        <a href=-->
<!--                        --><?//= Url::toRoute('basic-service/show-information'); ?>
<!--                        >创业资讯</a>-->
<!--                    </li>-->
<!--                    <li class='has-sub sub-li'>-->
<!--                        <a href=-->
<!--                        --><?//= Url::toRoute('basic-service/show-business'); ?>
<!--                        >工商注册</a>-->
<!--                    </li>-->
<!--                    <li class='has-sub sub-li'>-->
<!--                        <a href=-->
<!--                        --><?//= Url::toRoute('basic-service/show-finance'); ?>
<!--                        >财务代办</a>-->
<!--                    </li>-->
<!--                    <li class='has-sub sub-li'>-->
<!--                        <a href=-->
<!--                        --><?//= Url::toRoute('basic-service/show-law'); ?>
<!--                        >法务咨询</a>-->
<!--                    </li>-->
<!--                </ul>-->
<!--            </li>-->
<!--        </ul>-->
<!--        </div>-->
<!--        <div class="isLogin">-->
<!--            <ul>-->
<!--                <li>-->
<!--                    <img src="img/join.png">-->
<!--                    <span>免费注册</span>-->
<!--                </li>-->
<!--                <li>-->
<!--                    <img src="img/login.png" style="margin-top: -4px">-->
<!--                    <span style="color: #3A99DB">登陆</span>-->
<!--                </li>-->
<!--            </ul>-->
<!--        </div>-->
<!--    </div>-->
    <div class="contextDiv" style="background-color: white">
        <div style="clear: both;background-color: white"></div>
        <div style="background-image: url(img/head.png);height: 160px;text-align: center;">
            <span style="font-size: 14px;display: inline-block;margin-top: 10px">简单三步上传项目</span>
            <div style="color: #7f8c8d;margin-top: 20px;margin-bottom: 10px;text-align: center">

                <span id="b4"
                style="width: 160px;height: 160px;font-size: 22px;color: white;background-color: #3A99DB;border-radius: 50%;text-align: center;padding:12px 16px 10px 16px"
                >1</span>

                <img src="img/aiya.png" style="width: 100px;margin-left: 18px;margin-top: -10px;margin-right: 18px">

                <span id="b5"
                style="margin-left: 8px;width: 160px;height: 160px;font-size: 22px;color: #7c7c7c;background-color: inherit;border:1px solid #7c7c7c;border-radius: 50%;text-align: center;padding:12px 16px 10px 16px"
                >2</span>
                <img src="img/aiya.png" style="width: 100px;margin-left: 18px;margin-top: -10px;margin-right: 18px">



                <span id="b6"
                style="margin-left: 8px;width: 160px;height: 160px;font-size: 22px;color: #7c7c7c;background-color: inherit;border:1px solid #7c7c7c;border-radius: 50%;text-align: center;padding:12px 16px 10px 16px"
                >3</span>
            </div>
            <div style="text-align: center">
                <span style="font-size: 14px">基本情况</span>
                <span style="font-size: 14px;margin-left: 136px">项目细节</span>
                <span style="font-size: 14px;margin-left: 136px">联系信息</span>
            </div>
        </div>
        <?php $form = ActiveForm::begin(['id' => 'form1','options' => ['enctype' => 'multipart/form-data','target' => 'q']]) ?>
        <div style="background-color: #eff3f5;min-height: 600px;padding-top: 30px">
            <div style="background-color: white;border: 1px solid #dddddd;width:80%;min-height: 540px;margin-left: 10%;padding-top: 54px;padding-bottom: 54px">
                <div style="width: 50%;background-color: rgb(254,238,191);height: 110px;padding-top: 22px;padding-left:4%;padding-right: 4%;margin-left: 25%">
                    <span>
                        您的信息不会透露给任何第三方,我们会与您联系确认适合公开的项目信息.
                    </span>
                </div>
                <div id="info">
                    <div style="margin-left: 25%;width: 100%">
                        <h5 style="margin-bottom: 4px;margin-top: 20px">项目名称:</h5>
                        <input id="title" placeholder="请输入1-20个字符"
                        style="height: 40px;width: 22%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 4px;border: 1px solid rgb(171,171,173)">
                    </div>

                    <div style="margin-left: 25%;float: left;width: 24%">
                        <h5 style="margin-bottom: 4px;margin-top: 20px">项目类型:</h5>
                        <select placeholder="请输入1-20个字符"
                        style="height: 40px;width: 90%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 4px;border: 1px solid rgb(171,171,173)" id="field">
                        <?php foreach ($fields as $field): ?>
                         <option id="
                             <?= Html::encode($field->field_id) ?>
                         ">
                             <?= Html::encode($field->field_name) ?>
                         </option>
                     <?php endforeach; ?>  
                 </select>
             </div>
             <div style=";float: left;width: 22%">
                <h5 style="margin-bottom: 4px;margin-top: 20px">项目所在地:</h5>
                <select class="getProvince" onchange="getCities()" placeholder="请输入1-20个字符"
                style="height: 40px;width: 45%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 4px;border: 1px solid rgb(171,171,173)" id="province">
                     <?php foreach ($provinces as $province): ?>
                         <option id="
                             <?= Html::encode($province->id) ?>
                         ">
                             <?= Html::encode($province->province) ?>
                         </option>
                     <?php endforeach; ?> 
            </select>
            <select class="getCities" placeholder="请输入1-20个字符"
            style="margin-left: 5%;height: 40px;width: 45%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 4px;border: 1px solid rgb(171,171,173)" id="city">
            <?php foreach ($cities as $city): ?>
                         <option>
                             <?= Html::encode($city->province) ?>
                         </option>
                     <?php endforeach; ?> 
        </select>

    </div>
    <div style="clear: both"></div>
    <div style="margin-left: 25%;width: 100%">
        <h5 style="margin-bottom: 4px;margin-top: 20px">是否准备好详细的项目计划书?</h5>
        <input onclick="bb()" type="radio" name="pro" value="no" style="margin-right: 10px">还没有
        <input onclick="aa()" type="radio" name="pro" value="yes"
        style="margin-left: 20px;margin-right: 10px">已经准备好
        <div style="margin-top: 10px;display: none" id="file">
            <div class="form-group field-raiseduploadform-projectplan">
                <input type="hidden" name="RaisedUploadForm[projectPlan]" value="">
                <input type="file" id="raiseduploadform-projectplan" name="RaisedUploadForm[projectPlan]">
                <div class="help-block"></div>
            </div>
            
        </div>
        <script>
            function aa() {
                $('#file').css('display', '')
            }
            function bb() {
                $('#file').css('display', 'none')
            }
        </script>
        <div style="margin-top: 20px;text-align: left">
        <button id="next"
            style="height:40px;font-size: 20px;outline: none;width: 10%;border:none;color:white;border-bottom: 2px solid rgb(29,114,158);margin-top: 0px;background-color: #55B6E4" type="button">
            下一步
        </button>
    </div>
</div>
</div>

</div>
</div>
<?php ActiveForm::end() ?>
<!-- 解决表单提交刷新问题 -->
<iframe name="q" style="width:0; height:0; margin-top:-10px;"></iframe>
</div>
<div style="clear: both"></div>
<!--<footer style="background-color: #FFFFFF;height: 100px;width: 100%;margin-bottom: 20px">-->
<!--    <img src="img/logo-06.png" class="layoutLogo"-->
<!--    style="float: left;margin-left: 5%;margin-top:12px;margin-right: 30px">-->
<!--    <ul class="footUl">-->
<!--        <li><a href="#">商务合作</a></li>-->
<!--        <li><a href="#">常见问题</a></li>-->
<!--        <li><a href="#">关于我们</a></li>-->
<!--        <li><a href="#">业务规划</a></li>-->
<!--        <li><a href="#">联系我们</a></li>-->
<!--        <li><a href="#">免责声明</a></li>-->
<!--    </ul>-->
<!--    <img src="img/erweima.jpg" style="width: 80px;float: right;margin-right: 5%;margin-top:18px">-->
<!--</footer>-->
</body>
<script src="assets/js/jquery.min.js"></script>
<script src="js/index.js"></script>
<!--<![endif]-->
<script src="assets/js/amazeui.min.js"></script>
<!--<script src="js/chinaz.js"></script>-->
<script src="js/amazeui.swiper.min.js"></script>
<!--<script src="js/slick.min.js"></script>
-->
<!--<script src="assets/js/app.js"></script>
-->
</html>
<script>
var title;
var field;
var province;
var city;
var leaderName;
var mobile;
var email;
var weixin;
var projectPlan="";
var applicationForm="";
var attachment1="";
var attachment2="";
var attachment3="";
var businessLicense="";
var externalImage="";
var insideImage="";

   function change(id)
   {
       var file=$("#"+id).val(); 
       var filename=file.replace(/.*(\/|\\)/, ""); 
       var fileExt=(/[.]/.exec(filename)) ? /[^.]+$/.exec(filename.toLowerCase()) : '';
       return fileExt;
   }

    $(document).on('click', '#next', function () {
        title = $("#title").val();
        field = $("#field").val();
        province = $("#province").val();
        city = $("#city").val();
        // file=$("#raiseduploadform-projectplan").val(); 
        // filename=file.replace(/.*(\/|\\)/, ""); 
        // fileExt=(/[.]/.exec(filename)) ? /[^.]+$/.exec(filename.toLowerCase()) : '';
        if($("#raiseduploadform-projectplan").val() != "")
        {
            projectPlan = 'uploads/' + '<?php echo $_COOKIE["user_id"] ?>' + 'raised' + 'projectPlan' + '.' +change("raiseduploadform-projectplan");
        }
        // var flag = $("input:radio:checked").val();
        // if('yes' == flag)
        // {
        //     var file = document.getElementById("raiseduploadform-projectplan").files;
        //     alert(file[0].type);
        // }
        // var projectPlan = $("input:radio:checked").val();
        // alert(city);
        document.getElementById("form1").submit();
        $('#b4').css({'background-color': 'inherit', 'color': '#7c7c7c', 'border': '1px solid #7c7c7c'});
        $('#b5').css({
            'background-color': '#3A99DB',
            'color': 'white',
            'border': 'none'
        });
        $('#info').html('<div style="margin-left: 25%;width: 100%"> ' +
            '<h5 style="margin-bottom: 4px;margin-top: 10px">申请表下载:</h5> ' +
            '<h5 style="margin-bottom: 4px;margin-top: 20px;margin-top:0px;color:#7c7c7c">请下载1份创坞项目聚募挂牌申请表,及3份附件</h5> ' +
            '<div placeholder="请输入1-20个字符" ' +
            'style="height: 40px;width: 50%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 1px;border: 1px solid rgb(171,171,173)">' +
            '<span>创坞项目聚募挂牌申请表.doc</span>' +
            '<a href="#"><span style="float: right;color: black">下载</span></a>' +
            '</div>' +
            '<div placeholder="请输入1-20个字符" ' +
            'style="margin-top:10px;height: 40px;width: 50%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 1px;border: 1px solid rgb(171,171,173)">' +
            '<span>附件1.doc</span>' +
            '<a href="#"><span style="float: right;color: black">下载</span></a>' +
            '</div>' +
            '<div placeholder="请输入1-20个字符" ' +
            'style="margin-top:10px;height: 40px;width: 50%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 1px;border: 1px solid rgb(171,171,173)">' +
            '<span>附件2.doc</span>' +
            '<a href="#"><span style="float: right;color: black">下载</span></a>' +
            '</div>' +
            '<div placeholder="请输入1-20个字符" ' +
            'style="margin-top:10px;height: 40px;width: 50%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 1px;border: 1px solid rgb(171,171,173)">' +
            '<span>附件3.doc</span>' +
            '<a href="#"><span style="float: right;color: black">下载</span></a>' +
            '</div>' +
            '' +
            '<h5 style="margin-bottom: 4px;margin-top: 10px">申请表上传:</h5> ' +
            '<h5 style="margin-bottom: 4px;margin-top: 20px;margin-top:0px;color:#7c7c7c">请按要求填写完成1份创坞项目聚募挂牌申请表,及3份附件.完成后和运营执照一起上传</h5> ' +
            '<div style="width: 50%;border: 2px solid rgb(171,171,173);padding: 6px;border-radius: 4px">' +
            '<h5 style="margin-bottom: 4px;margin-top: 0px">创坞项目聚募挂牌申请表*</h5> ' +
            '<div class="form-group field-raiseduploadform-applicationform">' +
            '<input type="hidden" name="RaisedUploadForm[applicationForm]" value=""><input type="file" id="raiseduploadform-applicationform" name="RaisedUploadForm[applicationForm]">'+
            '<div class="help-block"></div>'+
            '</div>'+
            '<h5 style="margin-bottom: 4px;margin-top: 10px">附件1*</h5> ' +
            '<div class="form-group field-raiseduploadform-attachment1">'+
'<input type="hidden" name="RaisedUploadForm[attachment1]" value=""><input type="file" id="raiseduploadform-attachment1" name="RaisedUploadForm[attachment1]">'+
'<div class="help-block"></div>'+
'</div>' +
            '<h5 style="margin-bottom: 4px;margin-top: 10px">附件2*</h5> ' +
            '<div class="form-group field-raiseduploadform-attachment2">'+
'<input type="hidden" name="RaisedUploadForm[attachment2]" value=""><input type="file" id="raiseduploadform-attachment2" name="RaisedUploadForm[attachment2]">'+
'<div class="help-block"></div>'+
'</div>' +
            '<h5 style="margin-bottom: 4px;margin-top: 10px">附件3*</h5> ' +
            '<div class="form-group field-raiseduploadform-attachment3">'+
'<input type="hidden" name="RaisedUploadForm[attachment3]" value=""><input type="file" id="raiseduploadform-attachment3" name="RaisedUploadForm[attachment3]">'+
'<div class="help-block"></div>'+
'</div>' +
            '<h5 style="margin-bottom: 4px;margin-top: 10px">营业执照*</h5> ' +
            '<div class="form-group field-raiseduploadform-businesslicense">'+
'<input type="hidden" name="RaisedUploadForm[businessLicense]" value=""><input type="file" id="raiseduploadform-businesslicense" name="RaisedUploadForm[businessLicense]">'+
'<div class="help-block"></div>'+
'</div>'+

            '</div>' +
            '<h5 style="margin-bottom: 14px;margin-top: 10px">页面展示图片:</h5> ' +
            '<h5 style="margin-bottom: 10px;margin-top: 0px;color:#7c7c7c">页面展示图片x1*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;尺寸:xxx*xxx</h5> ' +

            '<div class="form-group field-raiseduploadform-externalimage">'+
'<input type="hidden" name="RaisedUploadForm[externalImage]" value=""><input type="file" id="raiseduploadform-externalimage" name="RaisedUploadForm[externalImage]">'+
'<div class="help-block"></div>'+
'</div>'+
            '<h5 style="margin-bottom: 10px;margin-top: 20px;color:#7c7c7c">页面内页显示图片x1*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;尺寸:xxx*xxx</h5> ' +

            '<div class="form-group field-raiseduploadform-insideimage">'+
'<input type="hidden" name="RaisedUploadForm[insideImage]" value=""><input type="file" id="raiseduploadform-insideimage" name="RaisedUploadForm[insideImage]">'+
'<div class="help-block"></div>'+
'</div>'+
            '<div style="margin-top: 20px;text-align: left"> ' +
            '<button id="next1"' +
            'style="height:40px;font-size: 20px;outline: none;width: 10%;border:none;color:white;border-bottom: 2px solid rgb(29,114,158);margin-top: 0px;background-color: #55B6E4" type="button">' +
            '下一步 ' +
            '</button>' +
            '</div>' +
            '</div>')
    });
    $(document).on('click','#next1',function () {
        if($("#raiseduploadform-applicationform").val() != "")
        {
            applicationForm = 'uploads/' + '<?php echo $_COOKIE["user_id"] ?>' + 'raised' + 'applicationForm' + '.' +change("raiseduploadform-applicationform");
        }
        if($("#raiseduploadform-attachment1").val() != "")
        {
            attachment1 = 'uploads/' + '<?php echo $_COOKIE["user_id"] ?>' + 'raised' + 'attachment1' + '.' +change("raiseduploadform-attachment1");
        }
        if($("#raiseduploadform-attachment2").val() != "")
        {
            attachment2 = 'uploads/' + '<?php echo $_COOKIE["user_id"] ?>' + 'raised' + 'attachment2' + '.' +change("raiseduploadform-attachment2");
        }
        if($("#raiseduploadform-attachment3").val() != "")
        {
            attachment3 = 'uploads/' + '<?php echo $_COOKIE["user_id"] ?>' + 'raised' + 'attachment3' + '.' +change("raiseduploadform-attachment3");
        }
        if($("#raiseduploadform-businesslicense").val() != "")
        {
            businessLicense = 'uploads/' + '<?php echo $_COOKIE["user_id"] ?>' + 'raised' + 'businessLicense' + '.' +change("raiseduploadform-businesslicense");
        }
        if($("#raiseduploadform-externalimage").val() != "")
        {
            externalImage = 'uploads/' + '<?php echo $_COOKIE["user_id"] ?>' + 'raised' + 'externalImage' + '.' +change("raiseduploadform-externalimage");
        }
        if($("#raiseduploadform-insideimage").val() != "")
        {
            insideImage = 'uploads/' + '<?php echo $_COOKIE["user_id"] ?>' + 'raised' + 'insideImage' + '.' +change("raiseduploadform-insideimage");
        }
        document.getElementById("form1").submit();
        $('#info').html('<div style="margin-left: 25%;float: left;width: 24%"> ' +
            '<h5 style="margin-bottom: 4px;margin-top: 20px"><span style="color: red">*</span>项目负责人姓名:</h5> ' +
            '<input placeholder="姓名"' +
            'style="height: 40px;width: 90%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 4px;border: 1px solid rgb(171,171,173)" id="leaderName"> ' +
            '</div> ' +
            '<div style=";float: left;width: 22%"> ' +
            '<h5 style="margin-bottom: 4px;margin-top: 20px"><span style="color: red">*</span>联系电话:</h5> ' +
            '<input placeholder="电话"' +
            'style="height: 40px;width: 90%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 4px;border: 1px solid rgb(171,171,173)" id="mobile"> ' +
            '</div>' +
            '<div style="clear: both"></div>'+
            '<div style="margin-left: 25%;float: left;width: 24%"> ' +
            '<h5 style="margin-bottom: 4px;margin-top: 20px"><span style="color: red">*</span>E-mail:</h5> ' +
            '<input placeholder="邮箱"' +
            'style="height: 40px;width: 90%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 4px;border: 1px solid rgb(171,171,173)" id="email"> ' +
            '</div> ' +
            '<div style=";float: left;width: 22%"> ' +
            '<h5 style="margin-bottom: 4px;margin-top: 20px"><span style="color: red">*</span>微信:</h5> ' +
            '<input placeholder="微信"' +
            'style="height: 40px;width: 90%;padding: 6px;outline: none;background-color: rgb(240,240,240);color: black;border-radius: 4px;border: 1px solid rgb(171,171,173)" id="weixin"> ' +
            '</div>' +
            '<div style="clear: both;height: 10px;margin-bottom: 1px"></div>'+
            '<div style="margin-top: 20px;text-align: center"> ' +
            '<button id="next2"' +
            'style="height:40px;font-size: 20px;outline: none;width: 10%;border:none;color:white;border-bottom: 2px solid rgb(29,114,158);margin-top: 0px;background-color: #55B6E4" type="submit">' +
            '提交 ' +
            '</button>' +

            '</div>'+
            ""
            );
    });

    $(document).on('click','#next2',function () {
        
        leaderName = $("#leaderName").val();
        mobile = $("#mobile").val();
        email = $("#email").val();
        weixin = $("#weixin").val();
        $.get(
             "<?= Url::toRoute('upload/insert-raised'); ?>",
             {'title':title,'field':field,'province':province,'city':city,'leaderName':leaderName,'mobile':mobile,'email':email,'weixin':weixin,'projectPlan':projectPlan,'applicationForm':applicationForm,'attachment1':attachment1,'attachment2':attachment2,'attachment3':attachment3,'businessLicense':businessLicense,'externalImage':externalImage,'insideImage':insideImage},
            function(data){
                 //alert(data);
                 alert("信息上传成功！");
            });
        //document.getElementById("form1").submit();
    });

    function getCities(){
        var selectObj = $(".getProvince")[0];
        var optionObj = selectObj.options[selectObj.selectedIndex];
        var father_id = optionObj.id;
        //$.get("<?= Url::toRoute('upload/getCity'); ?>",
        $.getJSON("<?= Url::toRoute('upload/city'); ?>",
            {'father_id':father_id},
            function(data){
                var realData = data;
                var count = realData.length;
                    $(".getCities").empty();
                for(var i=0;i<count;i++)
                {
                    $(".getCities").append("<option>"+realData[i]['province']+"</option>")
                }
            });
    };
    // $("#nextdd").click(function P(){
    //     var title = $("#title").val();
    //     var field = $("#field").val();
    //     var province = $("#province").val();
    //     var city = $("#city").val();
    //     //var option = province.options[province.selectedIndex].id;
    //     //var city = $("#city").options[$("#city").selectedIndex].text();
    //     var projectPlan = $("input:radio:checked").val();
    //     alert(projectPlan);
    // });
    $('.control-label').text('');
    $('#uploadform-file').css('display', 'inline');
</script>